<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<title>Whirlycache</title>
	</head>

<body>

	<h1>Example Whirlycache Config File</h1>	
	
	<p>
		Whirlycache is configurable using the <code>whirlycache.xml</code> file.  This file should 
		reside somewhere in your <code>CLASSPATH</code>.  If it cannot be found, the <code>whirlycache-default.xml</code> 
		file is loaded from the whirlycache jar file with some reasonably intelligent defaults.
	</p>
	<p>
		You should, however, create your own <code>whirlycache.xml</code> file by simply copying the sample 
		below and modifying it as necessary.
	</p>

<pre>
&lt;whirlycache&gt;

	&lt;default-cache&gt;default&lt;/default-cache&gt;

	&lt;cache name="default"&gt;
		&lt;backend&gt;com.whirlycott.cache.impl.ConcurrentHashMapImpl&lt;/backend&gt;
		&lt;tuner-sleeptime&gt;10&lt;/tuner-sleeptime&gt;
		
		&lt;!-- evicts oldest items when pruning --&gt;
		&lt;!-- &lt;policy&gt;com.whirlycott.cache.policy.FIFOMaintenancePolicy&lt;/policy&gt; --&gt;
		&lt;!-- evicts least recently used items when pruning --&gt;
		&lt;!-- &lt;policy&gt;com.whirlycott.cache.policy.LRUMaintenancePolicy&lt;/policy&gt; --&gt;
		&lt;!-- evicts least frequently used items when pruning --&gt;
		&lt;policy&gt;com.whirlycott.cache.policy.LFUMaintenancePolicy&lt;/policy&gt;
		
		&lt;maxsize&gt;100000&lt;/maxsize&gt;
	&lt;/cache&gt;

	&lt;cache name="secondone"&gt;
		&lt;backend&gt;com.whirlycott.cache.impl.ConcurrentHashMapImpl&lt;/backend&gt;	
		&lt;tuner-sleeptime&gt;10&lt;/tuner-sleeptime&gt;
		&lt;policy&gt;com.whirlycott.cache.policy.FIFOMaintenancePolicy&lt;/policy&gt;
		&lt;maxsize&gt;100&lt;/maxsize&gt;
	&lt;/cache&gt;
	
	&lt;cache name="third"&gt;
		&lt;backend&gt;com.whirlycott.cache.impl.ConcurrentHashMapImpl&lt;/backend&gt;
		&lt;tuner-sleeptime&gt;10&lt;/tuner-sleeptime&gt;
		&lt;policy&gt;com.whirlycott.cache.policy.FIFOMaintenancePolicy&lt;/policy&gt;
		&lt;maxsize&gt;3000&lt;/maxsize&gt;
	&lt;/cache&gt;
	
&lt;/whirlycache&gt;
</pre>

</body>
</html>